package com.mao.service.productstock;

import java.io.OutputStream;
import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mao.action.jsonvo.searchcenter.JsonVoSearchProductStock;
import com.mao.model.product.Product;
import com.mao.model.warehouse.WareHouse;
import com.mao.service.impl.productstock.ProductStockCondition;
import com.mao.service.impl.searchvoucher.SearchVoucherCondition;

@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public interface IProductStockService {

	/**
	 * 
	 *  Created on 2012-11-14 
	 * <p>Discription:[获取库存的详细仓库情况]</p>
	 * @author:[沈晓超]
	 * @update:[日期2012-11-14] [沈晓超]
	 * @param pro
	 * @return
	 * @return List<JsonVoSearchProductStock>
	 */
	public	List<JsonVoSearchProductStock> findStocksByPro(SearchVoucherCondition seachVoucherCondition);
	
	public List<JsonVoSearchProductStock> searchStockByPcId(ProductStockCondition psd,Integer page, Integer rows);
	
	// 销售出库单，查询商品在出库的仓库中库存
	public Integer findStockByProWareHouseDWR(Long productId,Long wareHouseId);
	
	public Integer searchStockByPcIdCount(ProductStockCondition psd);
	
	public void exportRemainStock(ProductStockCondition psc, OutputStream os);
	
	public void exportProfit(SearchVoucherCondition searchVoucherCondition, Integer page, Integer rows, OutputStream os);
}

